package gov.pbc.nn.kjgl.software.handle;

import gov.pbc.nn.kjgl.software.dao.YwDeptChangeDao;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.bstek.uflo.env.Context;
import com.bstek.uflo.model.ProcessInstance;
import com.bstek.uflo.process.handler.AssignmentHandler;
import com.bstek.uflo.process.node.TaskNode;

@Component("shOpinionAssignmentHandler")
public class ShOpinionAssignmentHandler implements AssignmentHandler {
	@Autowired
	private YwDeptChangeDao ywDeptChangeDao;

	@Override
	public Collection<String> handle(TaskNode taskNode,
			ProcessInstance processInstance, Context context) {
		String busId = processInstance.getBusinessId();
		// 根据businessId获取项目管理员以外的所有成员
		return ywDeptChangeDao.loadXmzUserByBusId(busId);
	}
}
